<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Xppass Administrator's Control Panel</title>
<LINK href="<?php echo $www_site_url?>/public/yav-style.css" type=text/css rel=stylesheet>
<script src="<?php echo $www_site_url?>/public/js/ajax.js" type="text/javascript"></script>
<script>
function checkOnSubmit(formName) {
  	
	var url = "<?php echo $www_site_url?>/admin.php";
	var params = mini.form.serialize($(formName));
	mini.ajax.post(url, function(r){
		var r = eval('(' + r + ')');   
		if(r.s==200){
			$('msg').innerHTML = r.m;
		}
		if(r.s==400){
			$('msg').innerHTML = r.m;			
		}
	}, params);
	
	return false;
       
}
</script>
</head>
<body>
<div id="msg" style="color:red;text-align:center"></div>
	<div class="container">
		<h3><?php echo lang('edituser')?>
							
					</h3>
					
				<div class="mainbox">
			<form id="edituserform" name="edituserform" action="<?php echo $www_site_url?>/admin.php" method="post" onsubmit="return checkOnSubmit('edituserform')">

			<input type="hidden" name="action" value="user">
			<input type="hidden" name="op" value="updateuser">
			<input type="hidden" name="reg_type" value="email">
			<input type="hidden" name="user_id" value="<?php echo $userinfo['user_id']?>"/>
			<input type="hidden" name="user" value="<?php echo $userinfo['user']?>" />
				<table class="opt">
					<tr>
						<th><?php echo lang('user')?>:</th>
					</tr>
					<tr>
						<td>
							<input type="text" name="newusername" value="<?php echo $userinfo['user']?>" class="textfield" readonly/>	<?php echo lang('user_label')?>						
						</td>
					</tr>
					<tr>
						<th><?php echo lang('pwd')?>:</th>
					</tr>
					<tr>
						<td>
							<input type="password" name="password" value="" class="textfield" /> <?php echo lang('pwd_label')?>
						</td>
					</tr>
				
					<tr>
						<th><?php echo lang('email')?>:</th>
					</tr>
					<tr>
						<td>
							<input type="text" name="email" value="<?php echo $userinfo['user_email']?>" class="textfield" />
						</td>
					</tr>					<tr>
						<th><?php echo lang('nickname')?>:</th>
					</tr>
					<tr>
						<td>
							<input type="text" name="nickname" value="<?php echo $userinfo['user_nickname']?>" class="textfield" />
						</td>
					</tr>					
					<tr>
						<th><?php echo lang('sex')?>:</th>
					</tr>
					<tr>
						<td>
							<input type="radio" name="sex" value="1" <?php if($userinfo['gender']==1) echo 'checked';?>/><?php echo lang('boy')?> &nbsp;&nbsp;<input type="radio" name="sex" value="2" <?php if($userinfo['gender']==2) echo 'checked';?>/><?php echo lang('girl')?>
						</td>
					</tr>
				</table>

				<div class="opt"><input type="submit" name="submit" value="<?php echo lang('submit')?>" class="button"/> <input type="button" class="button" onclick="javascript:history.back(-1)" value="<?php echo lang('backtouserlist')?>"></div>
			</form>
		</div>
	</div>

</body>
</html>